package entity;

public class Student {
    private String name;
    private int Id;
    private String sex;
    private int age;
    private double GPA;
    private int grade;
    private boolean inSchool;
    private String phone;
    public void disiplayinfo(){
        System.out.println("姓名："+name);
        System.out.println("学号："+Id);
        System.out.println("性别："+sex);
        System.out.println("年龄："+age);
        System.out.println("成绩："+GPA);
        System.out.println("年级："+grade);
        System.out.println("是否在校："+inSchool);
        System.out.println("电话："+phone);
    }

    // 无参构造方法
//    public entity.Student(){
//        System.out.println("构造方法被调用");
//    }

    // 有参构造方法
    public Student(String name,int Id,String sex,int age,double GPA,int grade,boolean inSchool,String phone){
        this.name=name;
        this.Id=Id;
        this.sex=sex;
        this.age=age;
        this.GPA=GPA;
        this.grade=grade;
        this.inSchool=inSchool;
        this.phone=phone;
    }
}